<h1>Listing links</h1>
<table width="100%"   cellspacing="4" cellpadding="4" border="0" align="center" bgcolor="#f0f0f0">
<tbody>
<tr BGCOLOR=#FFCC33>
    <td>Type</td>
    <td>WebUrl</td>  
    <td>Position</td>  
    <td>Action</td> 
</tr>
  
<% for link in @links %>
  <tr>

    <td><%=link_to link.title ,{:controller => "/admin/link", :action => "view",:id=>link},{:title=>link.description}%></td>
        <td><%=link_to link.weburl ,link.weburl%></td>  
    <td><%=link.position%></td>  

    <td><%= link_to 'Show', :action => 'show', :id => link %>
    ,<%= link_to 'Edit', :action => 'edit', :id => link %>
    ,<%= link_to 'Destroy', { :action => 'destroy', :id => link }, :confirm => 'Are you sure?', :method => :post %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @link_pages.current.previous } if @link_pages.current.previous %>
<%= link_to 'Next page', { :page => @link_pages.current.next } if @link_pages.current.next %> 

<br />

<%= link_to 'New link', :action => 'new' %>
